{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#Snippets and Programs from Chapter 4: Algebra and Symbolic Math with SymPy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#P96/97: Basic factorization and expansion\n",
    "from sympy import Symbol, factor, expand\n",
    "x = Symbol('x')\n",
    "y = Symbol('y')\n",
    "expr = x**2 - y**2\n",
    "f = factor(expr)\n",
    "print(f)\n",
    "# Expand\n",
    "print(expand(f))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#P97: Factorizing and expanding a complicated identity\n",
    "from sympy import Symbol, factor, expand\n",
    "x = Symbol('x')\n",
    "y = Symbol('y')\n",
    "expr = x**3 + 3*x**2*y + 3*x*y**2 + y**3 \n",
    "\n",
    "print('Original expression: {0}'.format(expr))\n",
    "factors = factor(expr)\n",
    "print('Factors: {0}'.format(factors))\n",
    "\n",
    "\n",
    "expanded = expand(factors)\n",
    "print('Expansion: {0}'.format(expanded))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#P97: Pretty printing\n",
    "from sympy import Symbol, pprint, init_printing\n",
    "x = Symbol('x')\n",
    "expr = x*x + 2*x*y + y*y\n",
    "pprint(expr)\n",
    "# Reverse order lexicographical\n",
    "init_printing(order='rev-lex')\n",
    "expr = 1 + 2*x + 2*x**2\n",
    "pprint(expr)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "*Since we have initialized pretty printing above, it will be active for all the output below this.*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#P99: Print a series\n",
    "\n",
    "'''\n",
    "Print the series:\n",
    "x + x**2 + x**3 + ... + x**n\n",
    "    ____  _____         ____    \n",
    "      2     3             n\n",
    "'''\n",
    "from sympy import Symbol, pprint, init_printing\n",
    "def print_series(n):\n",
    "    # initialize printing system with\n",
    "    # reverse order\n",
    "    init_printing(order='rev-lex')\n",
    "    x = Symbol('x')\n",
    "    series = x\n",
    "    for i in range(2, n+1):\n",
    "        series = series + (x**i)/i\n",
    "    pprint(series)\n",
    "\n",
    "if __name__ == '__main__':\n",
    "    n = input('Enter the number of terms you want in the series: ')\n",
    "    print_series(int(n))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#P100: Substituting in values\n",
    "from sympy import Symbol\n",
    "x = Symbol('x')\n",
    "y = Symbol('y')\n",
    "expr = x*x + x*y + x*y + y*y\n",
    "res = expr.subs({x:1, y:2})\n",
    "res"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#P102: Print a series and also calculate its value at a certain point\n",
    "\n",
    "'''\n",
    "Print the series:\n",
    "\n",
    "x + x**2 + x**3 + ... + x**n\n",
    "    ____  _____         ____    \n",
    "      2     3             n\n",
    "      \n",
    "and calculate its value at a certain value of x.\n",
    "'''\n",
    "\n",
    "from sympy import Symbol, pprint, init_printing\n",
    "def print_series(n, x_value):\n",
    "    # initialize printing system with\n",
    "    # reverse order\n",
    "    init_printing(order='rev-lex')\n",
    "    x = Symbol('x')\n",
    "    series = x\n",
    "    for i in range(2, n+1):\n",
    "        series = series + (x**i)/i\n",
    "    pprint(series)\n",
    "    # evaluate the series at x_value\n",
    "    series_value = series.subs({x:x_value})\n",
    "    print('Value of the series at {0}: {1}'.format(x_value, series_value))\n",
    "\n",
    "if __name__ == '__main__':\n",
    "    n = input('Enter the number of terms you want in the series: ')\n",
    "    x_value = input('Enter the value of x at which you want to evaluate the series: ') \n",
    "    print_series(int(n), float(x_value))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# P104: Expression multiplier\n",
    "\n",
    "'''\n",
    "Product of two expressions\n",
    "'''\n",
    "\n",
    "from sympy import expand, sympify\n",
    "from sympy.core.sympify import SympifyError\n",
    "def product(expr1, expr2):\n",
    "    prod = expand(expr1*expr2)\n",
    "    print(prod)\n",
    "\n",
    "if __name__=='__main__':\n",
    "    expr1 = input('Enter the first expression: ')\n",
    "    expr2 = input('Enter the second expression: ')\n",
    "    try:\n",
    "        expr1 = sympify(expr1)\n",
    "        expr2 = sympify(expr2)\n",
    "    except SympifyError:\n",
    "        print('Invalid input')\n",
    "    else:\n",
    "        product(expr1, expr2)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#P105: Solving a linear equation\n",
    ">>> from sympy import Symbol, solve \n",
    ">>> x = Symbol('x')\n",
    ">>> expr = x - 5 - 7\n",
    ">>> solve(expr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#P106: Solving a quadratic equation\n",
    ">>> from sympy import solve \n",
    ">>> x = Symbol('x')\n",
    ">>> expr = x**2 + 5*x + 4 \n",
    ">>> solve(expr, dict=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#P106: Quadratic equation with imaginary roots\n",
    ">>> from sympy import Symbol\n",
    ">>> x=Symbol('x')\n",
    ">>> expr = x**2 + x + 1\n",
    ">>> solve(expr, dict=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#P106/107: Solving for one variable in terms of others\n",
    ">>> from sympy import Symbol, solve\n",
    ">>> x = Symbol('x')\n",
    ">>> a = Symbol('a') \n",
    ">>> b = Symbol('b')\n",
    ">>> c = Symbol('c')\n",
    ">>> expr = a*x*x + b*x + c\n",
    ">>> solve(expr, x, dict=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#P107: Express s in terms of u, a, t\n",
    ">>> from sympy import Symbol, solve, pprint \n",
    ">>> s = Symbol('s')\n",
    ">>> u = Symbol('u')\n",
    ">>> t = Symbol('t')\n",
    ">>> a = Symbol('a')\n",
    ">>> expr = u*t + (1/2)*a*t*t - s\n",
    ">>> t_expr = solve(expr,t, dict=True) \n",
    ">>> t_expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "#P108: Solve a system of Linear equations\n",
    ">>> from sympy import Symbol\n",
    ">>> x = Symbol('x')\n",
    ">>> y = Symbol('y')\n",
    ">>> expr1 = 2*x + 3*y - 6 \n",
    ">>> expr2 = 3*x + 2*y - 12\n",
    ">>> solve((expr1, expr2), dict=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWwAAAD6CAYAAACF131TAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHyhJREFUeJzt3XtwVeW9//H3EgNTf4JAD2wiYU4wAQMRQlADThu6HU28\ncBJu6oAtcgoK3scLWG1VAijEUwUB7Yh3tIqgY4CeSgrH01DjJXEkoZZgYQxUAgkRI5Wa3w9MeH5/\nPOwQBCQhe++11t6f14zTfVt7f4fu+fLw3c/6LMcYg4iIeN8ZbhcgIiJto4YtIuITatgiIj6hhi0i\n4hNq2CIiPqGGLSLiE2rYIiI+cabbBUjscBynO3AJkAwYYCfwoTHmny6WJRIzHJ04Ix3lOE42MAvb\nqCuAPYADJAKZ2M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HIUzfcZFIaFe4RsRW2PX1MHUqjB9vt+uVlqpZi4h0RNgbdlOT\nHX+kp0PPnsqoFhEJl7DuEikpsT8qBgLKqBYRCbewNOyaGpg5Ez78EBYutGMQrahFRMIrLCORYcNg\nwAA7/pgwQc1aRCQSwrJLZMcOTP/+YahGJMy0S0Q8rl3L24hv6xNxkxq2eJw3tvWJiEh4qWGLiPiE\nGraIiE+oYYuI+IQatoiIT6hhi4j4hBq2iIhPqGGLiPiEGrZ42qxZsxg0aBAZGRmMHz+ef/7zny3P\nLViwgAEDBpCWlsb69etdrFIkOtSwxdNyc3PZsmULmzdvZuDAgSxYsACAqqoqVq5cSVVVFcXFxdx6\n660cPnzY5WpFIksNWzwtJyeHM86wX9MRI0ZQU1MDwJo1a5g0aRIJCQkkJyeTmppKeXm5m6WKRJwa\ntvjGiy++yNVXXw3Anj17SEpKankuKSmJ3bt3u1WaSFSE9QIGIqcjJyeHurq64x6fP38+eXl5ADz6\n6KN07tyZ66+//qTv4yjXV2JcuNL6RCLGcZz/BG4CLjPG/L8jj90PYIwpPHK/GJhtjCn73rEGmNPq\noRJjTEkUyhYJOzVs8TTHca4EngB+ZozZ1+rxwcDrQBbQF/gfINXoCy0xTCMR8bqlQGdgw5GRx4fG\nmFuNMVWO46wCqoAm4FY1a4l1WmGLiPiEdomIiPiEGraIiE+oYYuI+IQatoiIT6hhi4j4hBq2iIhP\nqGGLiPiEGraIiE/8f8lNdIGCV2r+AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1065be128>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<sympy.plotting.plot.Plot at 0x10742f4a8>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#P109: Simple plot with SymPy\n",
    ">>> from sympy.plotting import plot\n",
    ">>> from sympy import Symbol\n",
    ">>> x = Symbol('x')\n",
    ">>> plot(2*x+3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAV8AAAEBCAYAAADfMaYGAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGvBJREFUeJzt3X1w1NW9x/H3QSP2lj5ZIVARolcohPIQHwBtOzetBhSM\nAqICIrXo1anCFe1lBhUkCBgQxRHFFh8QwatAHzDWIkWFzVR6NbUkioagTYlCZCloiVcgDsFz/zhZ\nWAh53s357e7nNZOZ7GazOcbkw8lvP7/vz1hrERGRttXO9wJERFKRwldExAOFr4iIBwpfEREPFL4i\nIh4ofEVEPFD4SsIyxnQzxvyfMcb4XotIcyl8xRtjTMgY85kx5pQmPO7G4++31n5srf2GVVldEpDC\nV7wwxmQAA4F/Alc08nBb+yaSNBS+0izGmO/G6KkmAK8BK4CftXAtGcaYr4wx7Wpvh4wx9xlj3jDG\nfG6M+VP0eo0xg40xfzHG/MsYU2KM+Y+Y/JeItIDCV+pljPmpMebvxpg3jTEDjTHbgCJjTLkx5oJW\nPv0EYBWwGhhqjOnU6gU7Y4EbgE7AKcB/AxhjzgBeBu6z1n6n9v7fGWNOj9HXFWkWha80ZAEwErgD\nWA/cZK39d+BqYGFLn9QY8yPgDOAla+2HQCkwrvXLxQLPWGv/bq2txgX7gNqPjQfWWmvXAVhrXwPe\nBobF4OuKNJvCVxrSzlq7xVr7v8Aua+2fAay1m4EOrXjenwHrrbX/V3v7N7Tw0MMJhKPeP8jRdXYH\nrq495PAvY8y/gB8CnWP0dUWa5WTfC5BAi/7H+a7IO7XVrrSWPKEx5mvANUA7Y8yu2rvbA982xvSz\n1r7b0sU24mNghbX25jg9v0izaOcrDbnXGPN1AGvti1H3nw0sb+FzjgBqgN5A/9q33sCfcceB65Nm\njDk16q2+jUN9nd/ngFxjzBBjzEm1z5FdeyxYpM0pfKVe1toCa+3+E9xfbq19oIVPOwFYa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REScu4Rs9V/eBB2DUKFXGRESixTQSTzRXVwPNRUTqikksRubqDhqkuboiIk3R\nqsMOVVWwYAG89Rb07Qtbt6qrKyLSFC3a+VZXw8KFbsRjZSU89ZS7reAVEWmaZu18a2pg9WqYNs11\ndTds0HhHEZGWaFL4qqsrIhJbjYZvYaHb6R444GYxXHaZuroiIq3VYPiOGuXm686ZA2PGqDImIhIr\nDU4127QJe8EFqoxJMGmqmQRYcEdKirSWwlcCLHGuZCEikkoUviIiHih8RUQ8UPiKiHig8BUR8UDh\nKyLigcJXRMQDha+IiAcKXxERDxS+IiIeKHxFRDxQ+IqIeKDwFRHxQOErIuKBwldExAOFr4iIBwpf\nEREPFL4iIh4ofEVEPFD4ioh4oPAVL37zm9/Qp08fTjrpJDZv3nzMx/Lz8+nRowe9evVi/fr1nlYo\nEl8n+16ApKa+ffuyZs0abrnllmPuLy0tZdWqVZSWllJZWckll1zCBx98QLt22idIctFPtHjRq1cv\nevbsWef+goICxo4dS1paGhkZGZxzzjkUFRV5WKFIfCl8JVA++eQTunbteuR2165dqays9LgikfjQ\nYQeJm5ycHMLhcJ3777//fnJzc5v8PMaYWC5LJBCMtdb3GiSFGWM2Ar+01m6uvT0NwFo7r/b2OmCm\ntfatE3yuBWZF3RWy1obivmiRGNDOV4Igemv7EvC8MWYhcAbQAzjhQV9rrbbEkrB0zFe8MMaMNMbs\nAAYDfzTGvAJgrS0FVgOlwCvArVZ/nkkS0mEHEREPtPMVEfFA4Ssi4oHCV0TEA4WviIgHCl8REQ8U\nviIiHih8RUQ8UPiKiHjw/wySHkpXzynBAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1078db470>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<sympy.plotting.plot.Plot at 0x107878b70>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#P110: Plot in SymPy with range of x as well as other attributes specified\n",
    ">>> from sympy import plot, Symbol\n",
    ">>> x = Symbol('x')\n",
    ">>> plot(2*x + 3, (x, -5, 5), title='A Line', xlabel='x', ylabel='2x+3')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Enter your expression in terms of x and y: 2*x + 3*y - 6\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWwAAAD6CAYAAACF131TAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGu5JREFUeJzt3X1UlGXeB/DvNcES7nNc05XRFTcKFAZTHHxB7NiZVNrN\n1tfVgsoyc5/V1M3WDE0NtBB8QW0rtaPZqllqdjatU6xWvBjmo0i+gkWKZzXFVsp2DYGE6/njZnB4\nUWbwnrlf5vs5h3McGGau9cx+u/397t91CSkliIhI/yxaL4CIiNzDwCYiMggGNhGRQTCwiYgMgoFN\nRGQQDGwiIoNgYBMRGUSA1gsg8xNCtAMQDyAMgARwGsAXUsofNVwWkeEIDs6QtwghBgGYBSWovwRw\nDoAA0BmAHUpwL5FSfq7REokMhVfY5E2jAcyUUpY090MhRHcAkwHcMLCFEOsBPADgOyllz7rvtQew\nFcDtUIL/QSnlJfWWTqQ/vMIm3au7Ur8MYKNLYC8BcFFKuUQIkQzgNinlbC3XSeRtbDqS1wkh3qqr\nYzsfhwkhPnP396WUewD80OjbIwBsqPvzBgCjbnqhRDrHwCZf2APg/4QQDwgh/hfALgArbvI1rVLK\nC3V/vgDAepOvR6R7rGGT10kpXxdCFAH4DMBFALFSyvMqvr4UQrC2R6anVmDz/yx0XZs2bUJERAQW\nLlyII0eOdMrKyjp36NAh9O7d2+3XKC0txfDhw4G6z1pkZCTKyspkp06dcP78eURGRtb/zJUQAikp\nKfWPHQ4HHA7HTf4vIlKN8OTJvMImr3vvvfeQn5+PkJAQJCUlYfTo0ZgwYQI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
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1078ad7b8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#P112: Plot the graph of an input expression\n",
    "'''\n",
    "Plot the graph of an input expression\n",
    "'''\n",
    "from sympy import Symbol, sympify, solve\n",
    "from sympy.plotting import plot\n",
    "\n",
    "def plot_expression(expr):\n",
    "    y = Symbol('y')\n",
    "    solutions = solve(expr, y)\n",
    "    expr_y = solutions[0]\n",
    "    plot(expr_y)\n",
    "\n",
    "if __name__=='__main__':\n",
    "    expr = input('Enter your expression in terms of x and y: ')\n",
    "    try:\n",
    "        expr = sympify(expr)\n",
    "    except SympifyError:\n",
    "        print('Invalid input')\n",
    "    else:\n",
    "        plot_expression(expr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWwAAAD6CAYAAACF131TAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVOXeN/Dvckunt3ZW5mDibtwiIqVgnvJJ29ODpGki\n5n7w8GwktNTOtiu1siKfFNhpppaPe2sgUh7IPODeRlqesmvHKB7qFVSuV0UYOWjmccgRud8/bhcM\nKCMDa2bWGr6f6/KK08zcGv68+a3v+t2KEAJERKR/LXy9ACIiahgWbCIig2DBJiIyCBZsIiKDYMEm\nIjIIFmwiIoNgwSYiMoiWvl4A+Q9FUVoB6AvADEAAOAbg30KIsz5cFpHfUHjjDDWVoij9AbwBWaj3\nAjgBQAHQFkB3yML9NyHETh8tkcgvcIdNWhgO4DUhRMH1PqkoSgiASQCaVLAVRfkdgN0AioUQQxVF\nuRvAKgD3Q/6jECuEONOU1yDSM+6wyTAURfkrgB4A7hBCRCuK8jcAp4QQf1MUZSqAu4QQ03y7SiLP\n4UVH0oyiKJ9f7WOr75sVRdmi0XMHARgMYAlkuwUAogGkX307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Lp27XrNrw0bNgAAZs6ciePHjyMhIQGTJ0+u93kU\n7hzIz2l1azqRxymK8gcAG4UQDyqKMg0AhBDJVz+XDeA9IUROnccIAO87fWibEGKbl5ZMpCndHWBA\n5ExRlE5CiIKr7w4DsPfq21kAliuK8hGAdgA6AbimiS2E4Lab/AYLNuldkqIonQFcAfD/ADwHAEKI\nPEVRMgHkAagE8Lzgj4vk59gSISIyCF50JCIyCBZsIiKDYMEmIjIIFmwiIoNgwSYiMggWbCIig2DB\nJiIyCBZsIiKD+P+kB8NHYAWzFQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1077fdc88>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<sympy.plotting.plot.Plot at 0x1077fd898>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#P113: Plotting multiple functions\n",
    ">>> from sympy.plotting import plot \n",
    ">>> from sympy import Symbol\n",
    ">>> x = Symbol('x')\n",
    ">>> plot(2*x+3, 3*x+1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWwAAAD6CAYAAACF131TAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt8VNW5//HPjlJERUHFQAkQJECEQggggojN72DUaolc\nFME2xIhFoD1obcul3pAjNwURsYgXEiNVLrZKYqspCgLSHhMEpEoUOEUCCSSAKAhBAmT9/lhMnEDI\ndSazZ/J9v155kbntvRiGJyvPevazHGMMIiLifmGBHoCIiFSNAraISJBQwBYRCRIK2CIiQUIBW0Qk\nSChgi4gECQVsEZEgcX6gByChw3GcJkAfIBIwwE7gf40xhwI4LJGQ4ejCGaktx3H6AX/ABupNwB7A\nAVoAsdjA/ZQxZl2AhigSEjTDFl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7NixWp0zLKxqYbFv376sXbuWQ4cOkZuby4UXXshDDz1Uq3NX\nOja/Hl1EpBYuvPBCHn/8cVq3bg3AbbfdRtu2bdmwYQOO4zBp0iQee+wxPvroI37961/zwAMP0KhR\nI8aMGcMdd9xRepwJEyZw4403+nRsrVq1Km10ZozhvPPOo0WLFj49x5kUsEUkaBQWFrJt2zY6d+4M\n2EAZFhaGMaZMJcYzzzzDZ599RlpaGh999BEpKSm89tprPh/PunXraNKkCZdccgm7du1i5syZPj9H\nGcYYX3yJuJL9iEtFqvIegW++aqO4uNj079/fjB492hhjTElJiRk9erTJzc0199xzjzlw4IAZNWqU\nKSoqMsYYk5WVZZo2bWratGljlixZUqVzlJSUGMdxqj22/Px8Ex8fb8aNG1fu4xW8x9WKtarDlpCm\nGuPKBcN7VFJSwt13382RI0dIT0/nvPPOK/N4cnIyqampZ72uZ8+eHDhwgB07dpwzN71u3ToGDBhQ\nevvQoUNceumlpbf//ve/c91111U6xqysLG655Ra++eabsx7zVR22Lk0XEVczxjBy5Ej279/Pu+++\ne1awBsoN1n/6058oLi7mxz/+MU899RQTJ04s9/jXX399mSAbFhZWbtCtzIkTJ7jwwgur/brq0Axb\nQlowzB4Dze3v0ejRo9m8eTMffPABF110UZVes23bNnr37s2aNWto1KgRvXr14sMPPyQmJqbS14aF\nhVFSUlLp89544w369etHq1atyM3NZcSIEcTExPDcc8+d9Vxd6SgiIS83N5eXXnqJzZs307x5cxo3\nbkzjxo1ZvHjxOV9z8uRJEhMTmThxIl26dCEqKopp06aRmJjIiRMnKj1nVRs15eTkcN1113HxxRcT\nFxdHnz59eOqpp6r8d6sJzbAlpLl99ugGeo/8TzNsEZF6RgFbRCRIKGCLiAQJBWwRkSChgC0iEiQU\nsMX1vv/+e6699lq6detGp06dmDRpEgAHDx4kPj6eDh06cNNNN/Htt98GeKQi1VBcXO2XqKxPgkJR\nUREXXnghJ0+e5Prrr2fWrFlkZGRwxRVXMH78eGbOnMk333zDjBkzyrxOJWuV03vkf2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/plain": [
       "<matplotlib.figure.Figure at 0x10797d6a0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#P114: Plot of the two lines drawn in a different color\n",
    ">>> from sympy.plotting import plot \n",
    ">>> from sympy import Symbol\n",
    ">>> x = Symbol('x')\n",
    ">>> p = plot(2*x+3, 3*x+1, legend=True, show=False) \n",
    ">>> p[0].line_color = 'b'\n",
    ">>> p[1].line_color = 'r'\n",
    ">>> p.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3.51206400000000"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#P116: Example of summing a series\n",
    ">>> from sympy import Symbol, summation, pprint \n",
    ">>> x = Symbol('x')\n",
    ">>> n = Symbol('n')\n",
    ">>> s = summation(x**n/n, (n, 1, 5)) \n",
    ">>> s.subs({x:1.2})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[(-oo, -2), (2, oo)]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#P117: Example of solving a polynomial inequality\n",
    ">>> from sympy import Poly, Symbol, solve_poly_inequality\n",
    ">>> x = Symbol('x')\n",
    ">>> ineq_obj = -x**2 + 4 < 0 \n",
    ">>> lhs = ineq_obj.lhs\n",
    ">>> p = Poly(lhs, x)\n",
    ">>> rel = ineq_obj.rel_op\n",
    ">>> solve_poly_inequality(p, rel)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(-oo, -2) U (1, oo)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#P118: Example of solving a rational inequality\n",
    ">>> from sympy import Symbol, Poly, solve_rational_inequalities\n",
    ">>> x = Symbol('x')\n",
    ">>> ineq_obj = ((x-1)/(x+2)) > 0\n",
    ">>> lhs = ineq_obj.lhs\n",
    ">>> numer, denom = lhs.as_numer_denom()\n",
    ">>> p1 = Poly(numer)\n",
    ">>> p2 = Poly(denom)\n",
    ">>> rel = ineq_obj.rel_op\n",
    ">>> solve_rational_inequalities([[((p1, p2), rel)]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(0.643501108793284, 2.49809154479651)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#P118: Solve a non-polynomial inequality\n",
    ">>> from sympy import Symbol, solve, solve_univariate_inequality, sin \n",
    ">>> x = Symbol('x')\n",
    ">>> ineq_obj = sin(x) - 0.6 > 0\n",
    ">>> solve_univariate_inequality(ineq_obj, x, relational=False)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.4.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
